//
//  FLSShopFirstReusableView.m
//  ToListenPhone
//
//  Created by zhibao on 2023/7/21.
//

#import "FLSShopFirstReusableView.h"
@interface FLSShopFirstReusableView(){
    UILabel *jifenLael;
}
@end
@implementation FLSShopFirstReusableView
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = MyColor(@"#FADEA6");
        self.clipsToBounds = YES;
        UIImageView *imgView = [UIImageView new];
        imgView.image = [UIImage imageNamed:@"fulishe_duihuan_shop_bg"];
        imgView.contentMode = UIViewContentModeTop;
        [self addSubview:imgView];
        [imgView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.top.right.equalTo(self);
            make.height.mas_equalTo(pixw(215));
            make.bottom.equalTo(self).offset(-20);
        }];
        
        UIView *line = [UIView new];
        line.backgroundColor = MyColor(@"#F6F6F6");
        [self addSubview:line];
        [line mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.bottom.right.equalTo(self);
            make.height.mas_equalTo(20);
        }];
        
        UIImageView *iconImgView = [UIImageView new];
        iconImgView.image = [UIImage imageNamed:@"fulishe_duihuan_shop_jifen"];
        [self addSubview:iconImgView];
        [iconImgView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(20);
            make.top.mas_equalTo(140);
        }];
        
        jifenLael = [[UILabel alloc] init];
        jifenLael.font = MY_SCALE_SemiboldFONT(32);
        jifenLael.text = @"1000";
        jifenLael.textColor = [UIColor colorWithHexString:@"#9D5715"];
        [self addSubview:jifenLael];
        [jifenLael mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(iconImgView);
            make.height.mas_equalTo(40);
            make.left.equalTo(iconImgView.mas_right).offset(8);
        }];
    }
    return self;
}

- (void)update:(NSString *)jifen{
    jifenLael.text = jifen;
}
@end

